package com.exam.service;

import com.exam.dataobject.User;
import com.exam.vo.ResultVO;
import org.springframework.validation.BindingResult;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * Created by v
 * Date:2019/1/6
 * Time:20:25
 */
public interface UserService {

    User getUserByUserName(String userName);

    void ifUserExist(String userName);

    void saveRegisterUser(Map<String, Object> registerInfo, BindingResult bindingResult, HttpServletRequest request);

    Map<String, Object> login(Map<String, Object> userLogin, HttpServletRequest request, HttpServletResponse httpResponse);

    ResultVO isLogin(HttpServletRequest request);

    void logout(HttpServletRequest request, HttpServletResponse response);

    Map<String, Object> getUserInfo(Integer userId);

    void changeUserInfo(Map<String, Object> changeInfo, HttpServletRequest request);
}
